package com.tengju.support.infrastructure.schedule;

import com.tengju.support.application.message.MessageService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Slf4j
@Component
@RequiredArgsConstructor(onConstructor_ = {@Autowired})
public class MessageSendJob {

    private final MessageService messageService;

    @XxlJob("messageSendJob")
    public ReturnT<String> execute(String params) {
        messageService.sendMessage();
        return ReturnT.SUCCESS;
    }



}